From: Lars Ingebrigtsen Date: Sun, 30 Jan 2011 01:46:32 +0000 (+0000) Subject: nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5017 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b44ae4e467163b65df75e2bf8073c90301e0d5c5;p=emacs.git nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6a9a6e90591..19c3bee96ec 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-01-30 Lars Ingebrigtsen + + * nnimap.el (nnimap-request-head): Protect against not finding the + article by Message-ID. + 2011-01-29 Lars Ingebrigtsen * gnus-art.el (article-update-date-lapsed): Try a better way to really diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 6f7383062db..04e4bd6c9a2 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -519,15 +519,17 @@ textual parts.") (with-current-buffer (nnimap-buffer) (when (stringp article) (setq article (nnimap-find-article-by-message-id group article))) - (nnimap-get-whole-article - article (format "UID FETCH %%d %s" - (nnimap-header-parameters))) - (let ((buffer (current-buffer))) - (with-current-buffer (or to-buffer nntp-server-buffer) - (erase-buffer) - (insert-buffer-substring buffer) - (nnheader-ms-strip-cr) - (cons group article)))))) + (if (null article) + nil + (nnimap-get-whole-article + article (format "UID FETCH %%d %s" + (nnimap-header-parameters))) + (let ((buffer (current-buffer))) + (with-current-buffer (or to-buffer nntp-server-buffer) + (erase-buffer) + (insert-buffer-substring buffer) + (nnheader-ms-strip-cr) + (cons group article))))))) (defun nnimap-get-whole-article (article &optional command) (let ((result